cmake_minimum_required(VERSION 3.12.4)

project(vulnerability_scanner_component_tests)

set(CMAKE_CXX_FLAGS_DEBUG "-g --coverage -fsanitize=address,leak,undefined")

file(GLOB PROJECT_SOURCES
    *.cpp
    ${SRC_FOLDER}/vulnerability_scanner/src/*[!main]*.cpp
)

add_executable(${PROJECT_NAME} ${PROJECT_SOURCES})

target_link_libraries(${PROJECT_NAME}
        debug gtest_maind
        debug gtestd
        optimized gtest_main
        optimized gtest
        )

target_link_libraries(${PROJECT_NAME} vulnerability_scanner)

add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
